package com.wjt.polly.controller;

import com.wjt.polly.entity.Role;
import com.wjt.polly.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author liqin@nd.com.cn
 * @version V1.0
 * @title: RoleController
 * @description: TODO(用一句话描述该文件做什么)
 * @date: 2019/8/27 21:52
 */
@RestController
public class RoleController {

    @Autowired
    private RoleService roleService;

    @RequestMapping(value = "/query", method = RequestMethod.GET)
    public Role query(@RequestParam(value = "role_id", required = true) Integer roleId) {
        return  roleService.query(roleId);
    }

    @RequestMapping(value = "/", method = RequestMethod.GET)
    public String hello() {
        return  "h";
    }
}
